package jxgcxy.com;

public class Trapezoid {
    int up;
    int low;
    int height;
    int s;


    public Trapezoid() {
    }

    public Trapezoid(int up, int low, int height, int s) {
        this.up = up;
        this.low = low;
        this.height = height;
        this.s = s;
    }

    public int getUp() {
        return up;
    }

    public void setUp(int up) {
        this.up = up;
    }

    public int getLow() {
        return low;
    }

    public void setLow(int low) {
        this.low = low;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public int getS() {
        return s;
    }

    public void setS(int s) {
        this.s = s;
    }
    public void area(){
        s = (up +low)*height/2;
        System.out.println("面积是"+s);
    }
}
